package cn.xioabai.common.utility;

import java.util.regex.Pattern;

/**
 * @Author yangdaji
 * @Date 2022/11/2 0002
 * @PackageName cn.xioabai.utils
 * @ClassName NumberUtils
 */
public class NumberUtils {


    static Pattern compile = Pattern.compile("[0-9]*");

    /**
     * 校验是否为纯数字
     *
     * @param o
     * @return
     */
    public static boolean isNumber(Object o) {
        return compile.matcher(String.valueOf(o)).matches();
    }
}
